<?php $this->render('cmswidgets.views.notification_frontend'); ?>
<?php if ($this->display_type == ListViewBlock::DISPLAY_TYPE_HOMEPAGE) : ?>
    <?php if ($this->content_list != null) : ?>
        <?php
        //So I get the first content list and want to return as a Data Provider
        $content_list_data_provider = ListViewBlock::getContentList($this->content_list[0], null, null, ConstantDefine::CONTENT_LIST_RETURN_DATA_PROVIDER);

        //Get the current content List model
        if (isset($content_list_data_provider) && $content_list_data_provider != null) :
            ?>
            <?php
            $model = ContentList::model()->findByPk($this->content_list[0]);
            $termID = $model->terms[0];
            $contentType = $model->content_type[0];

            if ($termID != 0) {
                $term = Term::model()->findByPk($termID);
                echo '<h2>' . $term->name . '</h2>';
            } else {
                echo '<h2>' . t('cms', 'From the Blog') . '</h2>';
            }
            ?>
            <?php
            if (strtolower($contentType) == 'product') {
                $this->widget('zii.widgets.CListView', array
                    (
                    'viewData' => array('asset' => $this->layout_asset),
                    'dataProvider' => $content_list_data_provider,
                    'itemView' => 'common.blocks.listview.item_product_render',
                    'summaryText' => '',
                    'ajaxUpdate' => true,
                    'enablePagination' => true,
                    'enableSorting' => false,
                    'sortableAttributes' => array(),
                        )
                );
            } else {
                $this->widget('zii.widgets.CListView', array
                    (
                    'viewData' => array('asset' => $this->layout_asset),
                    'dataProvider' => $content_list_data_provider,
                    'itemView' => 'common.blocks.listview.item_render',
                    'summaryText' => '',
                    'ajaxUpdate' => true,
                    'enablePagination' => true,
                    'enableSorting' => false,
                    'sortableAttributes' => array(),
                        )
                );
            }
            ?>	            	
        <?php endif; ?>                   		
    <?php endif; ?>
<?php endif;
?>
<div id="cartContentTest"></div>
